const path = require('path')
const resolve = dir => {
  return path.join(__dirname, dir)
}
const BASE_URL = process.env.NODE_DEV === 'procution' ? '/iview-admin/' : '/'
module.exports = {
  lintOnSave: false,
  baseUrl: BASE_URL,
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src')) // # 方便引入 ./src === @
      .set('_c', resolve('src/components')) // # 方便引入 ./src === @
  },
  productionSourceMap: false,
  // # 跨域
  devServer: {
    proxy: 'http://127.0.0.1:4000'
  }
}
